package com.san.hkhospital.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * ClassName:MedBuyExample
 * PackageName:com.san.hkhospital.entity
 * Description:
 *
 * @Author:yy
 * @CreatedAt:2024/11/13 19:26
 * 
 */
 
 
public class MedBuyExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public MedBuyExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andMbIdIsNull() {
            addCriterion("mb_id is null");
            return (Criteria) this;
        }

        public Criteria andMbIdIsNotNull() {
            addCriterion("mb_id is not null");
            return (Criteria) this;
        }

        public Criteria andMbIdEqualTo(Integer value) {
            addCriterion("mb_id =", value, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdNotEqualTo(Integer value) {
            addCriterion("mb_id <>", value, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdGreaterThan(Integer value) {
            addCriterion("mb_id >", value, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("mb_id >=", value, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdLessThan(Integer value) {
            addCriterion("mb_id <", value, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdLessThanOrEqualTo(Integer value) {
            addCriterion("mb_id <=", value, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdIn(List<Integer> values) {
            addCriterion("mb_id in", values, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdNotIn(List<Integer> values) {
            addCriterion("mb_id not in", values, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdBetween(Integer value1, Integer value2) {
            addCriterion("mb_id between", value1, value2, "mbId");
            return (Criteria) this;
        }

        public Criteria andMbIdNotBetween(Integer value1, Integer value2) {
            addCriterion("mb_id not between", value1, value2, "mbId");
            return (Criteria) this;
        }

        public Criteria andMedIdIsNull() {
            addCriterion("med_id is null");
            return (Criteria) this;
        }

        public Criteria andMedIdIsNotNull() {
            addCriterion("med_id is not null");
            return (Criteria) this;
        }

        public Criteria andMedIdEqualTo(Integer value) {
            addCriterion("med_id =", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdNotEqualTo(Integer value) {
            addCriterion("med_id <>", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdGreaterThan(Integer value) {
            addCriterion("med_id >", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("med_id >=", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdLessThan(Integer value) {
            addCriterion("med_id <", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdLessThanOrEqualTo(Integer value) {
            addCriterion("med_id <=", value, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdIn(List<Integer> values) {
            addCriterion("med_id in", values, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdNotIn(List<Integer> values) {
            addCriterion("med_id not in", values, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdBetween(Integer value1, Integer value2) {
            addCriterion("med_id between", value1, value2, "medId");
            return (Criteria) this;
        }

        public Criteria andMedIdNotBetween(Integer value1, Integer value2) {
            addCriterion("med_id not between", value1, value2, "medId");
            return (Criteria) this;
        }

        public Criteria andMedNumIsNull() {
            addCriterion("med_num is null");
            return (Criteria) this;
        }

        public Criteria andMedNumIsNotNull() {
            addCriterion("med_num is not null");
            return (Criteria) this;
        }

        public Criteria andMedNumEqualTo(Double value) {
            addCriterion("med_num =", value, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumNotEqualTo(Double value) {
            addCriterion("med_num <>", value, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumGreaterThan(Double value) {
            addCriterion("med_num >", value, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumGreaterThanOrEqualTo(Double value) {
            addCriterion("med_num >=", value, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumLessThan(Double value) {
            addCriterion("med_num <", value, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumLessThanOrEqualTo(Double value) {
            addCriterion("med_num <=", value, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumIn(List<Double> values) {
            addCriterion("med_num in", values, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumNotIn(List<Double> values) {
            addCriterion("med_num not in", values, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumBetween(Double value1, Double value2) {
            addCriterion("med_num between", value1, value2, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedNumNotBetween(Double value1, Double value2) {
            addCriterion("med_num not between", value1, value2, "medNum");
            return (Criteria) this;
        }

        public Criteria andMedCostIsNull() {
            addCriterion("med_cost is null");
            return (Criteria) this;
        }

        public Criteria andMedCostIsNotNull() {
            addCriterion("med_cost is not null");
            return (Criteria) this;
        }

        public Criteria andMedCostEqualTo(BigDecimal value) {
            addCriterion("med_cost =", value, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostNotEqualTo(BigDecimal value) {
            addCriterion("med_cost <>", value, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostGreaterThan(BigDecimal value) {
            addCriterion("med_cost >", value, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("med_cost >=", value, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostLessThan(BigDecimal value) {
            addCriterion("med_cost <", value, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostLessThanOrEqualTo(BigDecimal value) {
            addCriterion("med_cost <=", value, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostIn(List<BigDecimal> values) {
            addCriterion("med_cost in", values, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostNotIn(List<BigDecimal> values) {
            addCriterion("med_cost not in", values, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("med_cost between", value1, value2, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedCostNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("med_cost not between", value1, value2, "medCost");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeIsNull() {
            addCriterion("med_product_time is null");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeIsNotNull() {
            addCriterion("med_product_time is not null");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeEqualTo(Date value) {
            addCriterion("med_product_time =", value, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeNotEqualTo(Date value) {
            addCriterion("med_product_time <>", value, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeGreaterThan(Date value) {
            addCriterion("med_product_time >", value, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("med_product_time >=", value, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeLessThan(Date value) {
            addCriterion("med_product_time <", value, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeLessThanOrEqualTo(Date value) {
            addCriterion("med_product_time <=", value, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeIn(List<Date> values) {
            addCriterion("med_product_time in", values, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeNotIn(List<Date> values) {
            addCriterion("med_product_time not in", values, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeBetween(Date value1, Date value2) {
            addCriterion("med_product_time between", value1, value2, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andMedProductTimeNotBetween(Date value1, Date value2) {
            addCriterion("med_product_time not between", value1, value2, "medProductTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeIsNull() {
            addCriterion("done_time is null");
            return (Criteria) this;
        }

        public Criteria andDoneTimeIsNotNull() {
            addCriterion("done_time is not null");
            return (Criteria) this;
        }

        public Criteria andDoneTimeEqualTo(Date value) {
            addCriterion("done_time =", value, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeNotEqualTo(Date value) {
            addCriterion("done_time <>", value, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeGreaterThan(Date value) {
            addCriterion("done_time >", value, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("done_time >=", value, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeLessThan(Date value) {
            addCriterion("done_time <", value, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeLessThanOrEqualTo(Date value) {
            addCriterion("done_time <=", value, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeIn(List<Date> values) {
            addCriterion("done_time in", values, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeNotIn(List<Date> values) {
            addCriterion("done_time not in", values, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeBetween(Date value1, Date value2) {
            addCriterion("done_time between", value1, value2, "doneTime");
            return (Criteria) this;
        }

        public Criteria andDoneTimeNotBetween(Date value1, Date value2) {
            addCriterion("done_time not between", value1, value2, "doneTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}